package yxy.game.pm2.bean.pubsub;

import yxy.apple.util.PubSub.ISubscription;
import yxy.apple.util.PubSub.Publisher;

// 征战发布者
public class ConquestPublisher extends Publisher {

	static private ConquestPublisher instance;

	public static ConquestPublisher getInstance() {
		if (instance == null) {
			instance = new ConquestPublisher();
		}
		return instance;
	}

	private ConquestPublisher() {

	}

	public void publish(String playerCode, int mapid) {
		this.publish(new ConquestSubscription(playerCode, mapid));
	}

	public static class ConquestSubscription implements ISubscription {
		private String playerCode;
		private int mapId;

		public ConquestSubscription(String playerCode, int mapId) {
			this.playerCode = playerCode;
			this.mapId = mapId;
		}

		public String getPlayerCode() {
			return playerCode;
		}

		public int getMapId() {
			return mapId;
		}

	}

}
